package edu.sctu.practice.class02.yangshengyu.assign03.test03;

/**
 * Created by Mr-zhu on 2015/10/24.
 */
public class CloneableCircle extends Circle implements Cloneable{
    private Name creator;

    public Name getCreator() {
        return creator;
    }

    public CloneableCircle(Name creator){
        this.creator = creator;
    }
    @Override
    protected Object clone() throws CloneNotSupportedException {
        CloneableCircle cloneableCircle = (CloneableCircle) super.clone();
        cloneableCircle.creator = (Name) cloneableCircle.creator.clone();
        return cloneableCircle;
    }
}
